package com.itheima;


import com.itheima.reggie.ReggieApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;


@SpringBootTest(classes = ReggieApplication.class)
@RunWith(SpringRunner.class)
public class testRedis {
    @Autowired
    private RedisTemplate redisTemplate;
    @Test
    public void testRedis(){
        System.out.println("red8s");
        redisTemplate.opsForValue().set("names","llp");
        System.out.println(redisTemplate.opsForValue().get("names"));
    }
}
